package com.zr.model;
// Generated 2017-6-29 19:45:38 by Hibernate Tools 4.0.0.Final

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Csealing generated by hbm2java
 */
@Entity
@Table(name = "csealing", catalog = "cqlwlps")
public class Csealing implements java.io.Serializable {

	private Integer seid;
	private Creceipt creceipt;
	private Set<Corder> corders = new HashSet<Corder>(0);

	public Csealing() {
	}

	public Csealing(Creceipt creceipt) {
		this.creceipt = creceipt;
	}

	public Csealing(Creceipt creceipt, Set<Corder> corders) {
		this.creceipt = creceipt;
		this.corders = corders;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "seid", unique = true, nullable = false)
	public Integer getSeid() {
		return this.seid;
	}

	public void setSeid(Integer seid) {
		this.seid = seid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "reid", nullable = false)
	public Creceipt getCreceipt() {
		return this.creceipt;
	}

	public void setCreceipt(Creceipt creceipt) {
		this.creceipt = creceipt;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "csealing")
	public Set<Corder> getCorders() {
		return this.corders;
	}

	public void setCorders(Set<Corder> corders) {
		this.corders = corders;
	}

}
